<?php
namespace Home\Controller;
use Think\Controller;
class BaseController extends Controller {
	public function __construct() {
		parent::__construct();
		$this->assign('site_name',C('site_name',null,'BedSystem'));
		if(session('?user_info')){
			$this->user_info = session('user_info');
			$this->has_login = true;
			$this->assign('user_info', $this->user_info);
		}
	}
	public function isLogin() {
		if(!$this->has_login){
			$this->display('Com:login');
		} else {
			return true;
		}
	}

	/**
	 * [make_login 确保登陆]
	 * @return [type]
	 */
	public function make_login() {
		if(!$this->has_login) {
			$this->display('Com:login');
			exit;
		} else {
			return true;
		}
	}
}